const mysql = require('mysql');

const connection = mysql.createConnection({
    host:'aagmqmvaq3h3zl.cvdpbjinsegf.us-east-2.rds.amazonaws.com',
    port:3306,
    user     : 'root',
    password : 'rootroot',
    database : 'uts_help'
});

connection.connect();

connection.query('SELECT * from student', function (error, results, fields) {
    if (error) throw error;
    else{
        //console.log(fields);
        console.log(results);
        console.log(results[0].studentId);
    }
});